<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="dgg" uri="/dgg-tags" %>
<style>
    .layer-warp .add-table th {
        width: 80px;
    }
</style>
<div class="layer-warp">
    <table class="add-table" style="width: 100%">
        <tbody>
        <c:if test="${type>0}">
        <tr>
            <th></th>
            <td>
                <label class="checkbox-label"><input name="overdue" type="radio" value="0" checked/> 正常备注</label>
                <label class="checkbox-label"><input name="overdue" type="radio" value="${type}" /> 超期备注</label>
            </td>
        </tr>
        <tr class="none" id="reasonDiv">
            <th><span class="required"/>超期原因:</th>
            <td>
                <%--<select name="reason" id="reason">
                    <option value="政策原因">政策原因</option>
                    <option value="客户原因">客户原因</option>
                    <option value="其他原因">其他原因</option>
                </select>--%>
                    <div class="layui-inline select2-inline">
                        <div class="layui-input-inline">
                            <select class="select-style signUserOrgClass" id="reason" name="reason" >
                                <option value>请选择</option>
                            </select>
                        </div>
                    </div>
            </td>
        </tr>
        </c:if>
        <tr>
            <th><span class="required"/>备注:</th>
            <td>
                <textarea class="textarea-style" id="remark" name="remark" rows="3" placeholder="500字以内"></textarea>
            </td>
        </tr>
        </tbody>
    </table>
</div>
<script type="text/javascript">

    $(document).ready(function () {
        areaLength($('#remark'),500)

        $('input[type=radio][name=overdue]').change(function() {
            if (this.value == 0) {
                $("#reasonDiv").addClass("none");
            }
            else {
                $("#reasonDiv").removeClass("none");
            }
         });
        //初始化原因
        commonTreeBookCode("#reason","OVERDUE_CAUSE",1,1,1,true);
    });
</script>
